<template>
  <div>
    
  <div class="contArticle">
      <!-- 标题 -->
      <div class="contArticle_tit">
       <h2>{{ activityById.activityTitle  }}</h2>
      </div>
      <div class="contArticle_author">
        <span>{{ activityById.createTime }}</span>
        <span>    来源：{{ activityById.createBy }}</span>
        <span>（浏览量：{{ activityById.click }}）</span>
      </div>

            <div class="contArticle_text">
                     <div  class="editor ql-container ql-snow">
                      <div style="margin-top: 15px;font-weight: 400;text-align: justify;font-size: 16px;line-height: 2;" class="ql-editor" v-html="activityById.activityContent"></div>
  
        </div>
 </div>
            <van-divider />
            </div>
  </div>
</template>
<script>
import { getActivity, updateActivityClick } from '@/api/activity'

  export default {
    data(){
              return {
      activityList: [], // 活动数据
      activityById: {}, //单条活动
      upActivity: '已是首条',//上一条活动
      nextActivity: '已是尾条'  //下一条活动
    }

    },
   mounted(){
    this.getList(this.$root.$mp.query.id)
  
  },
  methods: {
       getList(id) {
      getActivity(id).then(response => {
        this.activityById = response.data
        this.activityById.img = this.change(this.activityById.img)
      })
       this.activityById.img.map(item=>{
          item.url=this.changeUrl(item.fileName)
        })
    }
  }

}

</script>
<style scoped>
.contArticle{
  background-color: rgb(255, 255, 255);
  width: 95%;
  margin: 20rpx 20rpx 15rpx;
  -moz-box-shadow:2rpx 2rpx 5rpx #969696;
  -webkit-box-shadow:2rpx 2rpx 5rpx #838080;
  box-shadow:2rpx 2rpx 5rpx #969696;
  display:flex;
	padding:0 0px;
	flex-wrap:wrap;
  border-radius: 5px;
}
.contArticle_text{
text-align: center;
}
.contArticle_tit{
  text-align: center;
   font-size: 15pt;
    padding: 20rpx;
}
.title{
  color: #070707;
}
.time{
   text-align: right;
   color: #35353598;
   font-size: 10pt;
}
</style>